package DemoText;

import java.util.Scanner;

/**
 * 异或变换
 */
public class LuoGuP8763 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        long t = in.nextLong();
        String s = in.next();
        char[] nums = s.toCharArray();
        long x = 1;
        while (x < n) x <<= 1;
        t %= x;
        while (t-- != 0) {
            for (int i = n - 1; i > 0; i--)
                nums[i] = (char) ((nums[i - 1] - '0') ^ (nums[i] - '0')  + '0');
        }
        for (char ch : nums) System.out.print(ch);
    }
}
